package cn.itcast.dtx.txmsgdemo.bank1.service;

import cn.itcast.dtx.txmsgdemo.bank1.model.AccountChangeEvent;
import com.fasterxml.jackson.core.JsonProcessingException;

/**
 * @author zh_o
 * @date 2020-11-13
 */
public interface AccountInfoService {

    /**
     * 向mq发送转账消息
     * @param accountChangeEvent 消息对象
     */
    void sendUpdateAccountBalance(AccountChangeEvent accountChangeEvent) throws JsonProcessingException, Exception;

    /**
     * 新账户，扣减金额
     * @param accountChangeEvent 消息对象
     */
    void doUpdateAccountBalance(AccountChangeEvent accountChangeEvent);

}
